<!-- web_exam.html -->
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
 <head>
  <meta charset="UTF-8">
	<title> 购买反馈(有机会获得积分) </title>
		<style type="text/css">
		  div{width:720px;height:680px;
		  }	
		  .button{width:120px;height:45px;font-size:24px;}
		  table{width:720px;height:680px;text-align:left;}
          .tr_radio{height:100px;font-size:18px;}
		  .td_tg{color:#000099;font-style:bold;}
		  input{padding:0 15px;}
		</style>
    <script type="text/javascript">
    <!--
		function checkResult(){
           //评判成绩，5题100分，每题20分。
           var sum=0;                   //保存累加和
           var sel_radio=new Array(4);  //保存用户选择的答案
           var right_answer=new Array("A")
           //计算每题分数
           for (j=1; j<=1; j++)
           {
              switch (j){
              case 1: {obj=document.forms[0].r1;}break;
               }
               //alert("obj长度"+obj.length);
              for (i=0;i<=obj.length-1; i++ )
               {
                  if (obj[i].checked)
                  {sel_radio[j-1]=obj[i].value;
				  }                 
               }
           }
          //计算总分
			for (var ij = 0; ij < 2; ij++) {
				for (i=0; i<=4; i++)
				{
					if (sel_radio[i]==right_answer[i]){ sum=sum+20;}
					else(sum=10)
				}
			}
           alert("恭喜您获得了平台赠送的"+sum+"积分\n"+"积分可用于购买商品时抵消\n"+"10积分=1元");
     }
    //-->
    </script>
	</head>
	<body>
     <div id="" class="">
		<form method="post" action="">
		    <h3 align="center">对此次购买服务提出的建议</h3>
			<hr color="#227cb2" size=30px>
			<table>			
			<tr>
				<td>
				<table class="tr_radio" >
				<tr>
					<td class="td_tg">1，界面体验怎么样</td>
				</tr>
				<tr><td><input type="radio" name="r1" value="A">A.极差</td></tr>
				<tr>
					<td><input type="radio" name="r1" value="B">B.较好 </td>
				</tr>
				<tr>
					<td><input type="radio" name="r1" value="C">C.完美</td>
					</tr>
					<td><input type="radio" name="r1" value="D">D.以上都不是</td>
				    </tr>
				</table>
				</td>
			</tr>
			<tr>
				<td>
				<table class="tr_radio">
					<tr>
				<tr>
					<td class="td_radio">2.您主要使用哪些购物应用(多选)</td>
				</tr>
				<tr>
					<td><input type="checkbox" >A.淘宝 </td>
				</tr>
				<tr>
					<td><input type="checkbox" >B.京东</td>
				</tr>
				<tr>
					<td><input type="checkbox" >C.拼多多</td>
				</tr>
				<tr>
					<td><input type="checkbox" >D.京西</td>
				</tr>
					</tr>
				</table>
				</td>
			</tr>
				<tr><td>输出您的宝贵建议:</td></tr>
				<tr>
					<td><textarea  cols="80" rows="15" placeholder="字数200以内"></textarea></td>
				</tr>
				<td align="center"><input class="button" type="button" value="提交" onclick="checkResult();">
					&nbsp;&nbsp;<input class="button" type="reset" value="重置">
				</td>
				</td>
			</tr>
			</table>
		</form>
     </div>
	</body>
</html>
